export const store = {
    messageHistory: [],
    maxHistorySize: 1000,

    addMessage(message) {
        this.messageHistory.push(message);
        if (this.messageHistory.length > this.maxHistorySize) {
            this.messageHistory.shift();
        }
    },

    getMessages(limit = 100) {
        return this.messageHistory.slice(-limit);
    }
};